package com.zx.centers.socketservice.user;

import java.util.*;

public class UserCache {
    private static Map<String,TUser> users = new HashMap<>();

    static {
        TUser user1 = new TUser("123","红p小猪","1","zxsyh123","13916340665","zxyyc123456789@hotmail.com",new Date(),new Date(),null);
        TUser user2 = new TUser("456","猪夫人","1","zxsyh123","15216702102","yahui_222@126.com",new Date(),new Date(),null);
        List<TUser> userList1 = new ArrayList<>();
        userList1.add(user2);
        user1.setFriends(userList1);
        List<TUser> userList2 = new ArrayList<>();
        userList2.add(user1);
        user2.setFriends(userList2);
        users.put("123",user1);
        users.put("456",user2);
    }

    public static TUser getUser(String uid){
        return users.get(uid);
    }
}
